/*****************************************************************************
 *   Copyright 2011 ZHUANG Yuan              	                             *
 *   SudokuITS as Final Year Project for BScCS, City University of Hong Kong *
 *                                      									 *
 *   Licensed under the Apache License, Version 2.0 (the "License");         *
 *   you may not use this file except in compliance with the License.        *
 *   You may obtain a copy of the License at                                 *
 *                                                                           *
 *   http://www.apache.org/licenses/LICENSE-2.0                              *
 *                                                                           *
 *   Unless required by applicable law or agreed to in writing, software     *
 *   distributed under the License is distributed on an "AS IS" BASIS,       *
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.*
 *   See the License for the specific language governing permissions and     *
 *   limitations under the License.                                          *
 *****************************************************************************/

package android.sudoku.its.tutor;

import android.sudoku.its.util.GameVariables;

public class TutorUtil {
	/**
	 * Get the string indicating the row index. Note that rows are denoted by numbers form 1 to 9
	 * @param row	Integer row index
	 * @return		A string indicating the row index
	 */
	protected String getRowString(int row) {
		return Integer.toString(row + 1);
	}
	
	/**
	 * Get the string indicating the column index. Note that columns are denoted by letters from A to I
	 * @param col	Integer column index
	 * @return		A string indicating the column index
	 */
	protected String getColumnString(int col) {
		return Character.toString((char) (col + 'A'));
	}
	
	// TODO latin number
	protected String getBlockString(int row, int col) {
		return Integer.toString(row/GameVariables.BLOCK_SIDE_LENGTH * GameVariables.BLOCK_SIDE_LENGTH + col/GameVariables.BLOCK_SIDE_LENGTH + 1);
	}
}
